import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'test',
  templateUrl: './test.component.html',
  styleUrls: ['./test.component.scss']
})
export class TestComponent implements OnInit {

  data: any;

  options : any;
    
  constructor() {
      this.data = {
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
          datasets: [
              {
                  label: 'First Dataset',
                  data: [65, 59, 80, 81, 56, 55, 40]
              },
              {
                  label: 'Second Dataset',
                  data: [28, 48, 40, 19, 86, 27, 90]
              }
          ]
      };
      this.options = {
        title: {
            display: true,
            text: '测试',
            fontSize: 16
        },
        legend: {
            position: 'bottom'
        }
    };
  }

  ngOnInit() : void {

  }

  selectData(event : Event) : void {
    console.log(event);
  }

}
